/**
 * 
 */
package jmine.tec.report.cell.impl;

import java.text.DateFormat;
import java.text.NumberFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;

import jmine.tec.report.cell.DataCell;
import jmine.tec.report.cell.FunctionDataCell;

/**
 * Abstract class that implements empty methods, except for {@link FunctionDataCell#eval(java.util.List)}
 * 
 * @author takeshi
 */
public abstract class AbstractFunctionDataCell implements FunctionDataCell {

    /**
     * @return {@link Date}
     * @see br.com.maps.util.report.cell.DataCell#toDate()
     */
    public final Date toDate() {
        List<DataCell> cells = Collections.emptyList();
        return this.eval(cells).toDate();
    }

    /**
     * @return Double
     * @see br.com.maps.util.report.cell.DataCell#toDouble()
     */
    public final Double toDouble() {
        List<DataCell> cells = Collections.emptyList();
        return this.eval(cells).toDouble();
    }

    /**
     * @param dateFormat the date format
     * @param doubleFormat the double format
     * @param currencyFormat the currency format
     * @return String
     * @see br.com.maps.util.report.cell.DataCell#toString(java.text.DateFormat, java.text.NumberFormat, java.text.NumberFormat)
     */
    public final String toString(final DateFormat dateFormat, final NumberFormat doubleFormat,
            final NumberFormat currencyFormat) {
        return null;
    }

    /**
     * @param o the data cell
     * @return int
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    public int compareTo(final DataCell o) {
        List<DataCell> cells = Collections.emptyList();
        return this.eval(cells).compareTo(o);
    }

}
